package com.zju.DoctorGo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@Data
@TableName("messages")
public class Message {

    /**
     * 消息ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 发送者
     */
    @TableField(value = "sender")
    private String sender;

    /**
     * 接收者
     */
    @TableField(value = "receiver")
    private String receiver;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 日期
     */
    @TableField(value = "date")
    private String date;

    // 全参构造函数
    public Message(Long id, String sender, String receiver, String title, String content, String date) {
        this.id = id;
        this.sender = sender;
        this.receiver = receiver;
        this.title = title;
        this.content = content;
        this.date = date;
    }

    // 无参构造函数
    public Message() {
    }
}
